package com.gsy.CS480;


import com.gsy.gsy_common_util.fileUtil.DirectoryUtils;

import javax.swing.*;
import java.awt.*;
import java.io.File;


public class FileList {
    public static void main(String[] args) {

//        var ad = 123;

        File directory = new File("D:\\test\\tt\\184_10030998");
        System.out.println(directory.length());
        for (File file : directory.listFiles()) {
            file.renameTo(new File(file.getAbsolutePath().replaceAll("\\s", "")));
        }

        for (File file : DirectoryUtils.listAllFiles(directory)) {
            System.out.println(file.getName());
            if (file.isFile()) {
                if (!(file.getName().equals("pa3.py"))) {
                    file.delete();
                }
            }

            file.renameTo(new File(file.getAbsolutePath().replaceAll("\\s", "")));

            System.out.println(file.getAbsolutePath());
        }
    }
}
